package org.huangrui.spark.test

/**
 * @Author hr
 * @Create 2024-10-22 1:38 
 */
object Test9 {
  def main(args: Array[String]): Unit = {
    val ints = Seq(1, 2, 3, 4)

    val sum = ints.sum
    println(sum)
    val sum1: Int = ints.reduce(
      (num1: Int, num2: Int) => {
        return num1 + num2
      }
    )
    println(sum1)

  }
}
